function f = apq(x)
%   Almost Perturbed Quadratic Function   
%x0=[0.5, 0.5, ...,0.5]...  
%fmin=n/2,m=20
%Author:shi yangyang
n=length(x);
f=0.01*(x(1)+x(n))^2;
for i=1:n
    f=f+i*x(i)*x(i);
end
%f;